﻿namespace dotnet_notes.Controllers
{
    /// <summary>
    /// 业务基础控制器
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class BusinessBaseController(SqlSugarClient db, IMapper mapper) : ControllerBase
    {
        /// <summary>
        /// 数据库访问客户端
        /// </summary>
        protected SqlSugarClient Db { get; } = db;

        /// <summary>
        /// 对象映射器
        /// </summary>
        protected IMapper Mapper { get; } = mapper;
    }
}
